/**
 * This is the main application stylesheet. It should include or import all
 * stylesheets used throughout the application as this is the only stylesheet in
 * the Grunt configuration that is automatically processed.
 */
/**
 * First, we include the Twitter Bootstrap LESS files. Only the ones used in the
 * project should be imported as the rest are just wasting space.
 */
@import '../../vendor/bootstrap/less/alerts';
@import '../../vendor/bootstrap/less/badges';
@import '../../vendor/bootstrap/less/breadcrumbs';
@import '../../vendor/bootstrap/less/buttons';
@import '../../vendor/bootstrap/less/button-groups';
@import '../../vendor/bootstrap/less/close';
@import '../../vendor/bootstrap/less/code';
@import '../../vendor/bootstrap/less/dropdowns';
@import '../../vendor/bootstrap/less/forms';
@import '../../vendor/bootstrap/less/glyphicons';
@import '../../vendor/bootstrap/less/grid';
@import '../../vendor/bootstrap/less/input-groups';
@import '../../vendor/bootstrap/less/jumbotron';
@import '../../vendor/bootstrap/less/labels';
@import '../../vendor/bootstrap/less/list-group';
@import '../../vendor/bootstrap/less/mixins';
@import '../../vendor/bootstrap/less/modals';
@import '../../vendor/bootstrap/less/navbar';
@import '../../vendor/bootstrap/less/navs';
@import '../../vendor/bootstrap/less/normalize';
@import '../../vendor/bootstrap/less/pagination';
@import '../../vendor/bootstrap/less/panels';
@import '../../vendor/bootstrap/less/popovers';
@import '../../vendor/bootstrap/less/progress-bars';
@import '../../vendor/bootstrap/less/responsive-utilities';
@import '../../vendor/bootstrap/less/scaffolding';
@import '../../vendor/bootstrap/less/tables';
@import '../../vendor/bootstrap/less/tooltip';
@import '../../vendor/bootstrap/less/type';
@import '../../vendor/bootstrap/less/utilities';
@import '../../vendor/bootstrap/less/wells';
/**
 * Second, importing Less files from Font Awesome
 */
@import '../../vendor/font-awesome/less/mixins';
@import '../../vendor/font-awesome/less/path';
@import '../../vendor/font-awesome/less/core';
@import '../../vendor/font-awesome/less/larger';
@import '../../vendor/font-awesome/less/fixed-width';
@import '../../vendor/font-awesome/less/list';
@import '../../vendor/font-awesome/less/bordered-pulled';
@import '../../vendor/font-awesome/less/animated';
@import '../../vendor/font-awesome/less/rotated-flipped';
@import '../../vendor/font-awesome/less/stacked';
@import '../../vendor/font-awesome/less/icons';
/**
 * This is our main variables file. It in turn imports the `variables` file from
 * Twitter Bootstrap. We must include it last so we can overwrite any variable
 * definitions in our imported stylesheets.
 */
@import 'variables.less';

/**
 * Overrides for Bootstrap
 */
.nav a {
  cursor: pointer;
}

.navbar {
  border: 0;
}

.alert.alert-danger {
  text-align: left;
}

.alert.alert-warning {
  text-align: left;
}

/**
 * Overrides for the print
 */
.navbar {
  .hidden-print;
}

/**
 * General
 */

.ot-loading-indicator {
  .ot-icon-x(@fa-var-spinner);
  .fa-spin;
}

.ot-description {
  font-style: italic;
  color: #808080;
}

.ot-alert {
  .alert;
}

.ot-alert-error {
  .ot-alert;
  .alert-danger;
}

.ot-alert-warning {
  .ot-alert;
  .alert-warning;
}

.ot-alert-info {
  .ot-alert;
  .alert-info;
}

.ot-alert-success {
  .ot-alert;
  .alert-success;
}

.ot-noentry {
  .ot-alert;
  .alert-warning;
}

.ot-disable-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/**
 * Time picker
 */
div.ot-timepicker {
  display: inline-block;
  vertical-align: middle;
  td {
    padding: 0px;
    a.btn {
      padding: 0px !important;
      margin: 0px !important;
    }
  }
}

/**
 * Main layout
 */

img.ot-logo {
  width: @otIconSize;
  height: @otIconSize;
}

.ot-icon {
  width: @otIconSize;
  height: @otIconSize;
  min-width: @otIconSize;
  min-height: @otIconSize;
  max-width: @otIconSize;
  max-height: @otIconSize;
}

.ot-icon-mini {
  width: @otIconSizeMini;
  height: @otIconSizeMini;
  min-width: @otIconSizeMini;
  min-height: @otIconSizeMini;
  max-width: @otIconSizeMini;
  max-height: @otIconSizeMini;
}

div.ot-view {
  margin-top: 1em;
  .ot-view-title {
    font-size: 150%;
    font-weight: bold;
    margin: 0px 0px 0.5em;
    .ot-description {
      font-size: 66%;
      font-weight: normal;
    }
  }
  .ot-view-commands {
    .pull-right;
  }
}

.ot-footer {
  margin-top: 20px;
  .hidden-print;
  .ot-footer-inner {
    padding: 20px 0;
    text-align: right;
    font-size: 80%;
  }
  .ot-version {
    color: @link-color;
    cursor: pointer;
    &:hover {
      text-decoration: underline;
    }
  }
  .ot-version-label {
    font-weight: bold;
    .label;
    .label-default;
    &.ot-version-release {
      .label-success;
    }
    &.ot-version-warning {
      .label-danger;
    }
  }
}

.ot-signature {
  font-style: italic;
  font-size: 75%;
  color: #808080;
}

.ot-section-title {
  font-size: 120%;
  font-weight: bold;
  margin: 1em 0px 0.5em;
  color: @headings-small-color;
}

.ot-notification {
  .alert;
  .alert-dismissable;
  position: absolute;
  width: 40%;
  z-index: 200;
  top: 3em;
  right: 2em;
}

.ot-notification-error {
  .ot-notification;
  .alert-danger;
}

.ot-notification-info {
  .ot-notification;
  .alert-info;
}

.ot-notification-success {
  .ot-notification;
  .alert-success;
}

.ot-notification-warning {
  .ot-notification;
  .alert-warning;
}

.ot-view-breadcrumbs {
  font-size: 50%;
  .ot-view-breadcrumbs-separator {
    .ot-icon-x(@fa-var-play);
    opacity: 0.3;
  }
}

/**
 * Forms
 */

table.ot-form-view {
  td {
    padding: 0.5em;
  }
  .ot-field-value {
    font-weight: bold;
  }
}

/**
 * Entities
 */

.ot-entity-row {
  .row;
  margin-left: 0;
  margin-right: 0;
  padding-bottom: 0.5em;
}

.ot-entity-label {
  .bg-primary;
  display: inline-block;
  font-weight: bold;
  width: 100%;
  padding: 2em;
  text-decoration: none;
  cursor: pointer;
  &:hover {
    color: white;
  }
}

.ot-entity-disabled-alert {
  .alert;
  .alert-warning;
}

.ot-home-project-row {
  .ot-entity-row;
}

.ot-home-project-label {
  .ot-entity-label;
}

.ot-validationStamp-table {
  .table;
  .table-hover;
}

img.ot-entity-image-default {
  background-color: #808080;
  opacity: 0.5;
  border: dashed 1px #000000;
  margin-right: 0.5em;
}

span.ot-entity-image-default {
  color: grey;
  font-style: italic;
}

td.ot-entity-image {
  width: @otIconSize + 3;
}

.ot-promotion-run {
  display: inline-block;
  margin-right: 1em;
  .ot-promotion-run-signature {
    .ot-signature;
    display: block;
  }
}

.ot-project-branch-status-view {
  .btn;
  .btn-default;
  margin-right: 1em;
  height: 5em;
  .ot-project-branch-status-view-branch {
    font-weight: bold;
    display: block;
  }
}

.ot-branch-status-view-latest-build {
  .btn;
  .btn-default;
  cursor: default;
  height: 3em;
  margin-left: 1em;
}

.ot-promotion-view {
  display: inline-block;
  > span {
    .btn;
    .btn-default;
    padding: 0.5em;
    height: 3em;
    cursor: default;
    margin-right: 1em;
    margin-bottom: 0.5em;
  }
}

.ot-promotion-run-separator {
  .ot-icon-x(@fa-var-arrow-right);
  .fa-2x;
  display: inline-block;
  margin-right: 0.5em;
  vertical-align: 5px;
  opacity: 0.5;
}

table.ot-validation-runs {
  width: 100%;
  table-layout: fixed;
  tr {
    &:hover {
      background-color: white;
    }
    td {
      &:first-child {
        width: 30%;
      }
      padding-bottom: 0.5em;
      padding-top: 0.5em;
    }
  }
}

.ot-validation-run-status-horizontal {
  display: inline-block;
  a {
    text-decoration: none;
  }
  img.ot-validation-run-status {
    padding-left: 0.5em;
  }
}

/**
 * Promotion level & validation stamp list
 */

.ot-entity-sortable-list {
  .ot-entity-sortable-list-item {
    padding-left: 0.5em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    border-top: solid 1px @table-border-color;
    &:hover {
      background-color: @table-bg-hover;
    }
    .ot-entity-sortable-list-link {
      margin-left: 1em;
    }
    .ot-entity-sortable-list-handle {
      background: url('../assets/dnd.png') repeat-y;
      display: inline-block;
      width: 9px;
      margin-right: 0.5em;
      cursor: move;
    }
  }
}

/**
 * Commands
 */

.ot-action {
  cursor: pointer;
}

.ot-command {
  .ot-action;
  opacity: 0.35;
  &:hover {
    opacity: 1.0;
  }
}

a.ot-command {
  text-decoration: none;
  color: @text-color;
}

.ot-command-group {
  margin-right: 0.5em;
  button {
    border: 0;
  }
}

.ot-view-commands {
  text-align: right;
}

span.ot-view-command {
  margin-left: 0.5em;
  .ot-view-command-name {
    text-wrap: none;
    white-space: nowrap;
  }
}

.ot-command-delete {
  .ot-icon-x(@fa-var-trash);
}

.ot-command-update {
  .ot-icon-x(@fa-var-pencil);
}

.ot-command-close {
  .ot-icon-x(@fa-var-close);
}

.ot-command-api {
  .ot-icon-x(@fa-var-code);
}

.ot-command-actions {
  .ot-icon-x(@fa-var-wrench);
}

.ot-command-switch {
  .ot-icon-x(@fa-var-exchange);
}

.ot-command-changelog {
  .ot-icon-x(@fa-var-code);
}

.ot-command-previous {
  .ot-icon-x(@fa-var-step-backward);
}

.ot-command-next {
  .ot-icon-x(@fa-var-step-forward);
}

.ot-command-new {
  .ot-icon-x(@fa-var-plus);
}

.ot-command-disable {
  .ot-icon-x(@fa-var-ban);
}

.ot-command-enable {
  .ot-icon-x(@fa-var-check);
}

.ot-command-link {
  .ot-icon-x(@fa-var-link);
}

.ot-command-show-disabled {
  .ot-icon-x(@fa-var-eye);
}

.ot-command-hide-disabled {
  .ot-icon-x(@fa-var-eye-slash);
}

.ot-command-project-new {
  .ot-command-new;
}

.ot-command-project-search-builds {
  .ot-icon-x(@fa-var-search);
}

.ot-command-project-clone {
  .ot-icon-x(@fa-var-copy);
}

.ot-command-project-delete {
  .ot-command-delete;
}

.ot-command-project-update {
  .ot-command-update;
}

.ot-command-project-disable {
  .ot-command-disable;
}

.ot-command-project-enable {
  .ot-command-enable;
}

.ot-command-project-permissions {
  .ot-icon-x(@fa-var-key);
}

.ot-command-project-labels {
  .ot-icon-x(@fa-var-tags);
}

.ot-command-branch-new {
  .ot-command-new;
}

.ot-command-branch-update {
  .ot-command-update;
}

.ot-command-branch-disable {
  .ot-command-disable;
}

.ot-command-branch-enable {
  .ot-command-enable;
}

.ot-command-branch-delete {
  .ot-command-delete;
}

.ot-command-branch-template-definition {
  .ot-icon-x(@fa-var-share-alt);
}

.ot-command-branch-template-sync {
  .ot-icon-x(@fa-var-arrows-h);
}

.ot-command-branch-template-instance {
  .ot-icon-x(@fa-var-link);
}

.ot-command-branch-template-instance-disconnect {
  .ot-icon-x(@fa-var-unlink);
}

.ot-command-branch-template-instance-connect {
  .ot-icon-x(@fa-var-link);
}

.ot-command-branch-template-instance-sync {
  .ot-icon-x(@fa-var-refresh);
}

.ot-command-build-new {
  .ot-command-new;
}

.ot-command-build-update {
  .ot-command-update;
}

.ot-command-build-delete {
  .ot-command-delete;
}

.ot-command-validation-stamp-image {
  .ot-icon-x(@fa-var-image);
}

.ot-command-validation-stamp-update {
  .ot-command-update;
}

.ot-command-validation-stamp-delete {
  .ot-command-delete;
}

.ot-command-promotion-level-update {
  .ot-command-update;
}

.ot-command-promotion-level-image {
  .ot-icon-x(@fa-var-image);
}

.ot-command-promotion-level-delete {
  .ot-command-delete;
}

.ot-command-promote {
  .ot-icon-x(@fa-var-thumbs-o-up);
}

.ot-command-validate {
  .ot-icon-x(@fa-var-legal);
}

/**
 * Application info
 */

.ot-application-info {
  .ot-icon-x(@fa-var-info-circle);
  .text-info;
}

a.ot-application-info-success {
  .bg-success;
}

a.ot-application-info-info {
  .bg-info;
}

a.ot-application-info-warning {
  .bg-warning;
}

a.ot-application-info-error {
  .bg-danger;
}

/**
 * Application log
 */
.ot-application-log-error {
  .bg-danger;
}
.ot-application-log-fatal {
  .bg-danger;
  font-weight: bold;
}

/**
 * Properties
 */

.ot-property-panel {
  .panel;
  .panel-default;
  margin-left: -15px;
}

.ot-property-label {
  .label;
  .label-success;
  margin-right: 2px;
  font-weight: normal;
  img {
    .ot-icon-mini;
  }
}

/**
 * Decorations
 */

.ot-decoration {
  white-space: nowrap;
  font-weight: normal;
  font-size: 75%;
  margin-right: 0.5em;
  a {
    text-decoration: none;
    color: black;
  }
}

.ot-decoration-list {
  .ot-decoration {
    img {
      .ot-icon-mini;
    }
  }
}

.ot-icon-minis {
  .ot-icon {
    .ot-icon-mini;
  }
}

.ot-decoration-border {
  border: solid gray 1px !important;
  border-radius: 0.5em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  padding-bottom: 0.25em;
  padding-top: 0.25em;
  img {
    .ot-icon-mini;
  }
}

.ot-decoration-border + .ot-decoration-border {
  margin-left: 0.5em;
}

.ot-decoration-success {
  background-color: @label-success-bg;
  color: white;
}

/**
 * Branch build view
 */

.ot-branch-build-view-validation-stamp-filter {
  .btn;
  &.ot-branch-build-view-validation-stamp-filter-enabled {
    .btn-warning;
  }
  &.ot-branch-build-view-validation-stamp-filter-disabled {
    .btn-default;
  }
}

.ot-branch-build-view-validation-stamp-filter-item {
  margin-left: 2em;
  margin-right: 2em;
  padding: 0.25em;
  border: solid 1px gray;
  border-radius: 0.5em;
  cursor: pointer;
  &.ot-branch-build-view-validation-stamp-filter-item-selected {
    background-color: @brand-success;
  }
  &:hover {
    background-color: @brand-info;
  }
  + .ot-branch-build-view-validation-stamp-filter-item {
    margin-top: 0.5em;
  }
}

.ot-branch-build-view-auto-refresh {
  .btn;
  &.ot-branch-build-view-auto-refresh-enabled {
    .btn-success;
  }
  &.ot-branch-build-view-auto-refresh-disabled {
    .btn-default;
  }
}

table.ot-branch-build-view {
  .table;
  .table-condensed;
  .table-hover;
  .ot-branch-build-view-validation {
    text-align: center;
  }
}

.ot-branch-build-view-build-name {
  font-weight: bold;
}

div.ot-branch-build-view-build-signature {
  .ot-signature;
}

ul.ot-buildfilter-list {
  li {
    a {
      cursor: pointer;
    }
  }
}

ul.ot-validationstampfilter-list {
  li {
    a {
      cursor: pointer;
    }
  }
}

.ot-buildfilter-remote {
  font-weight: bold;
}

.ot-buildfilter-local {
  font-style: italic;
}

.ot-buildfilter-invalid {
  .text-muted;
  text-decoration: line-through;
}

/**
 * Search results
 */

dl.ot-search-result {
  dd {
    .ot-description;
  }
}

/**
 * Admin
 */

.ot-command-admin-global-acl {
  .ot-icon-x(@fa-var-key);
}

.ot-command-admin-action {
  .ot-icon-x(@fa-var-star);
}

.ot-admin-account-group {
  .label;
  .label-info;
  margin-right: 0.5em;
}

/**
  User menu
 */

.user-menu-filter {
  div.input-group {
    padding-left: 1em;
    padding-right: 1em;
  }
}
